﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;

namespace Reborn_Server.App1AppHandler
{
    public class LevelRequirement
    {
        public string Skill;
        public bool Required;
        public int LevelRequired;

        public string toXML()
        {
            string result = "";

            StringWriter stringWriter = new StringWriter();
            XmlTextWriter xmldoc = new XmlTextWriter(stringWriter);

            xmldoc.WriteStartElement("LevelRequirement");

            xmldoc.WriteAttributeString("Skill", Skill.ToString());
            xmldoc.WriteAttributeString("Required", Required.ToString());
            xmldoc.WriteAttributeString("LevelRequired", LevelRequired.ToString());

            xmldoc.WriteEndElement();
            xmldoc.Flush();

            xmldoc.Close();

            stringWriter.Flush();

            result = stringWriter.ToString();

            return result;
        }
    }

    

}
